1. Field of the Invention
The present invention relates to a program and method for generating an approximate curve as smooth as an original curve from point group data approximating the original curve shape by minute line segments.
2. Description of the Related Art
Curved surfaces of an object such as a mold are machined by means of drive shafts of a machine etc. controlled by an NC (numerical control) apparatus to which is input an NC program, which is generated on the basis of point group data generated by means of an apparatus for CAD/CAM, etc. With regard to this process, there is a method developed to generate a smooth approximate curve from point group data approximated by minute line segments, in which interpolation is performed along the approximate curve to process the curved surface in order to maintain the accuracy and the quality of a work surface and shorten a working time.
The point group data approximated by minute line segments to the original curve shape, such as transfer command data provided to each drive shaft of a machine, can be generated as follows by means of an apparatus for CAD/CAM, etc.
First, an offset shape Ko expanded outward by the radius of a tool used in an apparatus for the CAM in processing for a target shape Kj generated by an apparatus for CAD etc. is formed from approximate data of, for example, a polygon Kp obtained by combining minute planes as shown in FIG. 4 within a specified allowance.
Furthermore, the sectional line of the approximate offset shape Kp is approximated by further minute line segments (L) along the travel path of the tool when the process is performed in the apparatus for CAM etc., such that a command mode directed by the NC apparatus can be attained, and is represented by point group data (pi etc.).
However, for the following reason, there may arise a case where some of the point group data (pi etc.) indicating the approximate sectional line L fail to represent an ideal offset shape Ko obtained by expanding the shape by the radius of the tool, as shown in FIG. 5.
For example, such a case arises when one plane of a polygon Kp having an approximate offset shape is large, and exceeds a maximum distance of the thinning range specified when data are thinned into finally generated point group data.
In a further example situation, when the curved surface data for similar shapes are smoothly connected on the surface boundary line formed in the middle of the curved surface data of both shapes, a part of the point group data remaining after not being thinned when the point group data are finally generated is not located in an ideal offset shape Ko, due to the data being at a specific position on the shape data or the data belonging to another group.
Furthermore, the above-mentioned case may arise when an apparatus generates point group data without thinning when an allowance is considered only when a polygon Kp in an approximate offset shape is generated when final point group data (pi etc.) are generated from an ideal offset shape Ko, and the approximation is performed by the subsequent minute line segments.
Therefore, in the conventional method in which it is assumed that any piece of point group data Pi is located within an allowance evenly from an ideal offset shape Ko, the displacement from the ideal offset shape Ko changes depending on the position, and an approximate curve and a correction curve for interpolation can be generated such that a specified allowance can be exceeded in some cases. Therefore, the curvature and smoothness of the ideal offset shape Ko are lost, and as a result a streak or a distortion may be generated on a worked surface.
Especially, although a specified allowance is reduced to raise the position accuracy and the density of the point group data is increased to correspond to the work of higher accuracy, the amount of data of the polygon Kp indicating the approximate offset shape increases by a power of two or more. Therefore, the apparatus for the CAM etc. cannot accommodate this, and there may arise a case where each surface of the polygon Kp cannot be as minute as expected. In this case, the point group data close to the ideal offset shape Ko cannot be generated as expected although the processing time consumed by the apparatus for CAM and the amount of generated data increases while only the rate of the point group data located on each plane of the polygon Kp increases, thereby failing to achieve efficiency.